package com.bjsxt.sm.users.service.impl;

import java.util.List;
import java.util.Map;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.bjsxt.sm.common.util.PageInfoUtil;
import com.bjsxt.sm.users.dao.IAchecktableDao;
import com.bjsxt.sm.users.pojo.Achecktable;
import com.bjsxt.sm.users.service.IAchecktableService;
import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
@Service("checktableService")
public class IAchecktableServiceImpl implements IAchecktableService
{	@Resource
	private IAchecktableDao checktableDao;
	@Override
	public List<Achecktable> findCondListAchecktableService(PageInfoUtil pageInfoUtil ,Map<String, Object> condMap)
	{
		
		if(pageInfoUtil != null)
		{
			/* 分页 */
			Page page = PageHelper.startPage(pageInfoUtil.getCurrentPage(), pageInfoUtil.getPageSize());
			List<Achecktable> achecktableList = this.checktableDao.findListAchecktable(condMap);
			/* 设置一下总记录数 */
			pageInfoUtil.setTotalRecord(Integer.valueOf(page.getTotal() + ""));
			return achecktableList;
		}
		return this.checktableDao.findListAchecktable(condMap);
	}
}
